/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI.Menu;

import GUI.Tiec.JIFDatTiec;
import GUI.Tiec.JIFThemMonAn;
import javax.swing.JDesktopPane;

/**
 *
 * @author Mr
 */
public class JIFQLDatTiec extends javax.swing.JInternalFrame {

    private JDesktopPane desktop;

    /**
     * Creates new form JIFQLDatTiec
     */
    public JIFQLDatTiec() {
        javax.swing.plaf.InternalFrameUI gui = this.getUI();
        ((javax.swing.plaf.basic.BasicInternalFrameUI) gui).setNorthPane(null);
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        btQLTiec = new javax.swing.JButton();
        btDatTiec = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();

        jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 51, 204), 3));

        btQLTiec.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/Thue.png"))); // NOI18N
        btQLTiec.setText("Quản Lý Tiệc");
        btQLTiec.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btQLTiecActionPerformed(evt);
            }
        });

        btDatTiec.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/Dat.png"))); // NOI18N
        btDatTiec.setText("Đặt Tiệc");
        btDatTiec.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btDatTiecActionPerformed(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel1.setText("QUẢN LÝ");

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel2.setText("ĐẶT TIỆC");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2))
                .addGap(161, 161, 161)
                .addComponent(btDatTiec, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(42, 42, 42)
                .addComponent(btQLTiec, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(260, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel2))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(btQLTiec, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(btDatTiec, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(2, 2, 2)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btDatTiecActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btDatTiecActionPerformed
        // TODO add your handling code here:
        if (getDesktop().getComponentCount() != 0) {
            getDesktop().getComponent(0).setVisible(false);
        }
        getDesktop().removeAll();
        JIFDatTiec frame;

        try {
            frame = new JIFDatTiec();
            frame.setVisible(true);
            frame.setSelected(true);
            getDesktop().add(frame);
        } catch (Exception e) {
        }
    }//GEN-LAST:event_btDatTiecActionPerformed

    private void btQLTiecActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btQLTiecActionPerformed
        // TODO add your handling code here:
        if (getDesktop().getComponentCount() != 0) {
            getDesktop().getComponent(0).setVisible(false);
        }
        getDesktop().removeAll();
        JIFThemMonAn frame;

        try {
            frame = new JIFThemMonAn();
            frame.setVisible(true);
            frame.setSelected(true);
            getDesktop().add(frame);
        } catch (Exception e) {
        }
    }//GEN-LAST:event_btQLTiecActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btDatTiec;
    private javax.swing.JButton btQLTiec;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables

    public void setDesktop(JDesktopPane desktop) {
        this.desktop = desktop;
    }

    /**
     * @return the desktop
     */
    public JDesktopPane getDesktop() {
        return desktop;
    }
}
